package com.nulldev.util.java.swing.extSwing.resources;

import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.ImageIcon;

import com.nulldev.util.java.swing.extSwing.eMessage;

public enum eMessageType {

	ERROR("type.ERROR", 
			Toolkit.getDefaultToolkit().getImage(eMessage.class.getResource("/com/nulldev/util/java/swing/extSwing/resources/error.png"))),
	WARNING("type.WARNING", 
			Toolkit.getDefaultToolkit().getImage(eMessage.class.getResource("/com/nulldev/util/java/swing/extSwing/resources/warning.png"))),
	INFO("type.INFO", 
			Toolkit.getDefaultToolkit().getImage(eMessage.class.getResource("/com/nulldev/util/java/swing/extSwing/resources/info.png"))),
	SUCCESS("type.SUCCESS", 
			Toolkit.getDefaultToolkit().getImage(eMessage.class.getResource("/com/nulldev/util/java/swing/extSwing/resources/tick.png"))),

	;
	private final String idn;
	private final Image img;
	private eMessageType (final String identifer, final Image icon) {
		this.idn = identifer;
		this.img = icon;
	}
	
	public Image getImage() {
		return this.img;
	}
	
	public ImageIcon toIcon() {
		return new ImageIcon(this.img);
	}
	
}
